#include<stdio.h>
int main() {
	double input;
	double sum;
	int ans;
	while (1) {
		scanf("%lf",&input);
		if (input == 0) break;
		sum = 0;
		for (int i = 1;; i++) {
			sum += 1.0/ (i + 1.0);
			if (sum >= input) {
				ans = i;
				break;
			}
		}
		printf("%d card(s)\n",ans);
	}
	return 0;
}